package gui;

import physics.Forcer;
import physics.PhysicsEngine;

public class ForcerMenu extends Menu<Forcer> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Override
	protected void add() {
		ForcerCreator fc = new ForcerCreator();
		fc.setVisible(true);
		fc.setSize(377,610);
	}

	@Override
	protected void edit(Forcer e) {
		ForcerEditor fe = ForcerEditorManager.get().getEditor(e);
		fe.setSize(233,377);
		fe.setVisible(true);
		refresh();
	}

	@Override
	protected Forcer[] getThings() {
		return PhysicsEngine.getPhysicsEngine().getForcers().toArray(new Forcer[0]);
	}

	@Override
	protected void remove(Forcer e) {
		PhysicsEngine.getPhysicsEngine().removeForcer(e);
		refresh();
	}

}
